|
|
|
|
|
|
|
Learn how to determine an objects type |
|
|
|
|
|
|
|
|
Learn how to use the built-in System objects |
|
|
|
|
|
|
|
|
Create multiple instances of forms |
|
|
|
|
|
|
|
|
Sample Project File: \Chapter21\SystemObject.vbp |
|
|
|
|
|
|
|
|
An object is a complex data type thats made up of properties and methods. Forms and controls are examples of objects. These entities have properties you can set to change their appearance or make them behave a certain way. Methods tell an object to perform some action. You can declare and use variables in your code that represent objects. An object is a reference to an area in memory (that is, a pointer). This pointer can point to a screen object or an object in memory somewhere. These object variables allow you to manipulate forms, controls, system objects, references to ActiveX objects, and so on. |
|
|
|
|
|
|
|
|
You should already be familiar with objects; you use them every time you develop a Visual Basic application. Forms are objects, and controls are objects. You set the Top or Left property of a form to make that form display in a certain location. You can invoke the forms Show method to make it display on the screen. You create controls by dragging them from the toolbox onto a form. You then change the controls properties to make them look and act a certain way. Now youll learn a little about some of the other objects in the Visual Basic environment that you can manipulate. |
|
|
|
|
|
|
|
|
Every control in the Visual Basic toolbox has a specific class name. This class name will vary according to the type of control and the manufacturer of that control. This unique name is known as a specific object type. Table 21.1 shows a list of the specific object types or class names that come with the Professional Edition of Visual Basic. |
|
|
|
|
|